package com.cynthia.system.service.impl;

import com.cynthia.system.model.SysRolePermission;
import com.cynthia.system.mapper.SysRolePermissionMapper;
import com.cynthia.system.service.ISysRolePermissionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 角色权限表 服务实现类
 * </p>
 *
 * @author cynthia
 * @since 2021-12-15
 */
@Service
public class SysRolePermissionServiceImpl extends ServiceImpl<SysRolePermissionMapper, SysRolePermission> implements ISysRolePermissionService {

    @Autowired
    private SysRolePermissionMapper sysRolePermissionMapper;

    @Override
    public boolean deleteRolePermissionByRoleId(int roleId) {
        int i = sysRolePermissionMapper.deleteRolePermissionByRoleId(roleId);
        if (i>0){
            return true;
        }
        return false;
    }
}